--- permalink: /python/style-template description: Markdown CSS Style Template name: Markdown CSS Style Template has_thumbnail: false thumbnail: /images/static-image language: python layout: user-guide page_type: u-guide sitemap: false --- {% raw %}
In the Plotly Webapp you can share your graphs over email to your colleagues who are also Plotly members. If your making graphs periodically or automatically, e.g. in Python with a cron job, it can be helpful to also share the graphs that you're creating in an email to your team.
This notebook is a primer on sending nice HTML emails with Plotly graphs in Python. We use:
smtplib and email libraries included in the Python standard library# This is a comment
from plotly.offline import iplot, init_notebook_mode
init_notebook_mode()
iplot([{'x': [1, 2, 3], 'y': [3, 1, 5]}])
If we use the same filename, the graph will save to the same URL. So, if we include a graph in an email by it's URL, we can update that graph by calling py.plot with the same filename.
for i in range(100):
print i